package com.example.shiro.demo.service;

import com.alibaba.fastjson.JSONObject;
import com.example.shiro.demo.entity.Role;
import com.example.shiro.demo.entity.User;

import javax.servlet.http.HttpServletResponse;
import java.util.Optional;

import java.util.Map;

/**
 * <Description> <br>
 *
 * @author renweiping<br>
 * @version 1.0<br>
 * @taskId: <br>
 * @createDate 2019/10/14 13:17 <br>
 * @see com.example.shiro.demo <br>
 */
public interface ILoginService {

    //添加用户

    User addUser(Map<String, Object> map);

    //添加角色
    Role addRole(Map<String, Object> map);


    //查询用户通过用户名
    User findByName(String name);

    //查询用户通过用户名和密码
    User findNameAndPass(String name, Integer pass);


    JSONObject login(String user, Integer pass, HttpServletResponse res);

}
